import module from '../../module'

export default name => {
    const root = `${module.code}/${name}/`
    const crud = $http.crud(root)
    // 查询票种
    crud.ticketTypeQuery = params => {
        return $http.get('/baseinfo/ticket_type/query', params)
    }
    // 查询客票信息
    crud.getorderinfo = params => {
        return $http.get('/dispatch/common/getorderinfo', params)
    }
    //查询车次信息
    crud.queryrunbusinfo = params => {
        return $http.get('/dispatch/common/queryrunbusinfo', params)
    }
    // 客票改签
    crud.changeticket = params => {
        return $http.post('/dispatch/common/changeticket', params)
    }
    // 查询当前客票
    crud.querycurrentuserbill = params => {
        return $http.get('/dispatch/common/querycurrentuserbill', params)
    }
    //查询运行车次座位信息
    crud.getrunbusseatinfo = params => {
        return $http.get('/dispatch/common/getrunbusseatinfo', params)
    }
    //获取班次列表
    crud.querybusinfoforselect = params => {
        return $http.get('/dispatch/common/querybusinfoforselect', params)
    }
    //始发站查询
    crud.stationQuery = params => {
        return $http.get('/baseinfo/station/query', params)
    }
    //获取默认发车站
    crud.getstartstation = params => {
        return $http.get('/dispatch/common/getstartstation', params)
    }
    return {
        ...crud
    }
}
